+2004-11-30 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
+ the end of gdk_pixmap_new() - on X11 the bits are not initialized
+ either - fixes bug #145107
+
+ * gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
+ when drives are plugged in or removed. Fixes bug #137815
+
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
+2004-11-30 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
+ the end of gdk_pixmap_new() - on X11 the bits are not initialized
+ either - fixes bug #145107
+
+ * gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
+ when drives are plugged in or removed. Fixes bug #137815
+
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
+2004-11-30 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
+ the end of gdk_pixmap_new() - on X11 the bits are not initialized
+ either - fixes bug #145107
+
+ * gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
+ when drives are plugged in or removed. Fixes bug #137815
+
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
+2004-11-30 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
+ the end of gdk_pixmap_new() - on X11 the bits are not initialized
+ either - fixes bug #145107
+
+ * gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
+ when drives are plugged in or removed. Fixes bug #137815
+
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
}
drawable_impl->handle = hbitmap;
- /* initialize */
- memset (bits, 0, (bmi.bmiHeader.biBitCount * width * height) / 8);
pixmap_impl->bits = bits;
gdk_win32_handle_table_insert (&GDK_PIXMAP_HBITMAP (pixmap), pixmap);
{
GObject parent_instance;
+ guint32 drives; /* bitmask as returned by GetLogicalDrives() */
GHashTable *folder_hash;
};
system_parent_class->finalize (object);
}
+static gboolean
+check_volumes (gpointer data)
+{
+ GtkFileSystemWin32 *fs_win32 = GTK_FILE_SYSTEM_WIN32 (data);
+
+ g_return_val_if_fail (fs_win32, FALSE);
+
+ if (fs_win32->drives != GetLogicalDrives())
+ g_signal_emit_by_name (fs_win32, "volumes-changed", 0);
+
+ return TRUE;
+}
+
static GSList *
gtk_file_system_win32_list_volumes (GtkFileSystem *file_system)
{
DWORD drives;
gchar drive[4] = "A:\\";
GSList *list = NULL;
+ GtkFileSystemWin32 *fs_win32 = (GtkFileSystemWin32 *)file_system;
drives = GetLogicalDrives();
+ fs_win32->drives = drives;
+ /* set up an idle handler for volume changes, every second should be enough */
+ g_timeout_add_full (0, 1000, check_volumes, fs_win32, NULL);
+
if (!drives)
g_warning ("GetLogicalDrives failed.");